﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormsApp1.Common.Dto;
using WinFormsApp1.Leo;
using WinFormsApp1.Leo.ListWeeks03;
using WinFormsApp1.Leo.week02;
using WinFormsApp1.SuYi;
using WinFormsApp1.SuYi.ReportsShow;
using WinFormsApp1.SuYi.week1WinForm;
using WinFormsApp1.SuYi.Week2WinForm;
using WinFormsApp1.TongShiWei;
using WinFormsApp1.TongShiWei.COA;
using WinFormsApp1.TongShiWei.Log;
using WinFormsApp1.TongShiWei.PigData;
using WinFormsApp1.TongShiWei.segmentationData;
using WinFormsApp1.TongShiWei.UPC;
using WinFormsApp1.WangHaoQi._02Winfroms;
using WinFormsApp1.WangHaoQi.Week02Winfroms;

namespace WinFormsApp1
{
    public partial class Main3 : Form
    {
        /// <summary>
        /// 页面刷新
        /// </summary>
        private WebBrowser webBrowser = new WebBrowser();

        //全局变量
        public int c = 0;
        public Main3()
        {
            InitializeComponent();
            webBrowser.Dock = DockStyle.Fill;
            this.Controls.Add(webBrowser);
            if (UsersLogin.UsersName == null)
            {
                uiButton1.Text = "登录";
            }
            else
            {
                uiLabel1.Text = UsersLogin.UsersName;
                uiButton1.Text = "退出登录";
            }
        }

        private void uiNavMenu1_MenuItemClick(TreeNode node, Sunny.UI.NavMenuItem item, int pageIndex)
        {
            var gh = node.Tag;
            c = 0;
            c = Convert.ToInt32(gh);
            //清除子窗体
            this.panel1.Controls.Clear();
            //刷新当前页面
            webBrowser.Refresh();

            ///////////基础信息
            if (c == 111)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //企业新增
                BusinesWinForm businesWinForm = new BusinesWinForm();
                //隐藏窗体边框
                businesWinForm.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                businesWinForm.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(businesWinForm);
                //显示企业新增页面
                businesWinForm.Show();
            }
            if (c == 121)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //部门新增
                AddDepartmentData addDepartmentData = new AddDepartmentData();
                //隐藏窗体边框
                addDepartmentData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addDepartmentData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addDepartmentData);
                //显示部门新增页面
                addDepartmentData.Show();
            }
            if (c == 131)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //客户新增
                Clientser clientser = new Clientser();
                //隐藏窗体边框
                clientser.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                clientser.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(clientser);
                //显示客户新增页面
                clientser.Show();
            }
            ///////////活畜管理
            if (c == 211)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //进场登记新增
                CheckInAddHtml checkInAddHtml = new CheckInAddHtml();
                //隐藏窗体边框
                checkInAddHtml.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                checkInAddHtml.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(checkInAddHtml);
                //显示进场登记新增页面
                checkInAddHtml.Show();
            }
            //新增检疫报告单
            if (c == 221)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //新增检疫报告单
                AddCOAData addCOAData = new AddCOAData();
                //隐藏窗体边框
                addCOAData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addCOAData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addCOAData);
                //显示进场检疫标准页面
                addCOAData.Show();
            }
            //检验标准列表
            if (c == 222)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //检疫标准
                ShowIPQCData showIPQCData = new ShowIPQCData();
                //隐藏窗体边框
                showIPQCData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                showIPQCData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(showIPQCData);
                //显示进场检疫标准页面
                showIPQCData.Show();
            }
            //检验项目列表
            if (c == 223)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //检疫项目设置新增
                ShowPRQSData showPRQSData = new ShowPRQSData();
                //隐藏窗体边框
                showPRQSData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                showPRQSData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(showPRQSData);
                //显示检疫项目设置页面
                showPRQSData.Show();
            }
            //检验项目新增
            if (c == 224)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //检验项目新增
                AddPRQSData addPRQSData = new AddPRQSData();
                //隐藏窗体边框
                addPRQSData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addPRQSData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addPRQSData);
                //显示检疫项目新增页面
                addPRQSData.Show();
            }
            //检验报告单列表
            if (c == 225)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //检验报告单列表
                ShowCOAData showCOAData = new ShowCOAData();
                //隐藏窗体边框
                showCOAData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                showCOAData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(showCOAData);
                //显示检疫项目新增页面
                showCOAData.Show();
            }
            //检验标准表新增
            if (c == 226)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //检验标准表新增
                AddIPQCData_ addIPQCData_ =new AddIPQCData_();
                //隐藏窗体边框
                addIPQCData_.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addIPQCData_.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addIPQCData_);
                //显示检疫项目新增页面
                addIPQCData_.Show();
            }
            if (c == 231)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //活畜称重新增
                LiveAnimalsAddHtml liveAnimalsAddHtml = new LiveAnimalsAddHtml();
                //隐藏窗体边框
                liveAnimalsAddHtml.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                liveAnimalsAddHtml.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(liveAnimalsAddHtml);
                //显示活畜称重页面
                liveAnimalsAddHtml.Show();
            }
            if (c == 241)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //待宰圈管理新增
                SlaughteredAdd slaughteredAdd = new SlaughteredAdd();
                //隐藏窗体边框
                slaughteredAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                slaughteredAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(slaughteredAdd);
                //显示待宰圈管理新增页面
                slaughteredAdd.Show();
            }
            ///////////基础设置
            if (c == 311)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //磅秤设置新增
                AddScaleContext addScaleContext = new AddScaleContext();
                //隐藏窗体边框
                addScaleContext.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addScaleContext.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addScaleContext);
                //显示磅秤设置新增页面
                addScaleContext.Show();
            }
            if (c == 331)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //扣减项新增
                DeductionWinForm deductionWinForm = new DeductionWinForm();
                //隐藏窗体边框
                deductionWinForm.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                deductionWinForm.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(deductionWinForm);
                //显示扣减项新增页面
                deductionWinForm.Show();
            }
            if (c == 341)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //待宰圈设置新增
                WaitingWinForm waitingWinForm = new WaitingWinForm();
                //隐藏窗体边框
                waitingWinForm.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                waitingWinForm.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(waitingWinForm);
                //显示待宰圈设置新增页面
                waitingWinForm.Show();
            }
            if (c == 351)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //磅秤类型新增
                ScaleTypetes scaleTypetes = new ScaleTypetes();
                //隐藏窗体边框
                scaleTypetes.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                scaleTypetes.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(scaleTypetes);
                //显示磅秤类型新增页面
                scaleTypetes.Show();
            }
            ///////////批宰管理
            if (c == 411)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //批宰计划新增
                SlaughterWinFormAdd slaughterWinFormAdd = new SlaughterWinFormAdd();
                //隐藏窗体边框
                slaughterWinFormAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                slaughterWinFormAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(slaughterWinFormAdd);
                //显示批宰计划新增页面
                slaughterWinFormAdd.Show();
            }
            if (c == 421)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //白条新增
                PigWeighData pigWeighData = new PigWeighData("");
                //隐藏窗体边框
                pigWeighData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                pigWeighData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(pigWeighData);
                //显示白条新增页面
                pigWeighData.Show();
            }
            if (c == 431)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //副产新增
                AddWeighingSheetWinForm addWeighingSheetWinForm = new AddWeighingSheetWinForm();
                //隐藏窗体边框
                addWeighingSheetWinForm.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addWeighingSheetWinForm.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addWeighingSheetWinForm);
                //显示副产新增页面
                addWeighingSheetWinForm.Show();
            }
            if (c == 441)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //皮重设置新增
                TareAdd tareAdd = new TareAdd();
                //隐藏窗体边框
                tareAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                tareAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(tareAdd);
                //显示皮重设置页面
                tareAdd.Show();
            }
            if (c == 451)
            {
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //分割领用新增
                SplitRequisAdd splitRequisAdd = new SplitRequisAdd();
                //隐藏窗体边框
                splitRequisAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisAdd);
                //显示分割领用页面
                splitRequisAdd.Show();
            }
            ///////////称重
            if (c == 511)
            {
                //膘油称重新增
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //膘油称重新增
                OilyfatAdd splitRequisAdd = new OilyfatAdd();
                //隐藏窗体边框
                splitRequisAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisAdd);
                //显示膘油称重新增页面
                splitRequisAdd.Show();
            }
            if (c == 521)
            {
                //生产划膘新增
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                //生产划膘新增
                ScratchesAdd splitRequisAdd = new ScratchesAdd();
                //隐藏窗体边框
                splitRequisAdd.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisAdd.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisAdd);
                //显示生产划膘页面
                splitRequisAdd.Show();
            }
            if (c == 531)
            {
                //分割入库新增
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                ////分割入库新增新增
                //SplitRequisAdd splitRequisAdd = new SplitRequisAdd();
                ////隐藏窗体边框
                //splitRequisAdd.FormBorderStyle = FormBorderStyle.None;
                ////知识子非顶级窗体
                //splitRequisAdd.TopLevel = false;
                ////将子窗体载入panel
                //this.panel1.Controls.Add(splitRequisAdd);
                ////显示分割入库新增页面
                //splitRequisAdd.Show();
            }
            if (c == 541)
            {
                //销售称重新增
                if (UsersLogin.RolesName == "普通用户" || UsersLogin.RolesName == null)
                {
                    MessageBox.Show("非管理员请勿点击");
                    return;
                }
                ////销售称重新增
                //SplitRequisAdd splitRequisAdd = new SplitRequisAdd();
                ////隐藏窗体边框
                //splitRequisAdd.FormBorderStyle = FormBorderStyle.None;
                ////知识子非顶级窗体
                //splitRequisAdd.TopLevel = false;
                ////将子窗体载入panel
                //this.panel1.Controls.Add(splitRequisAdd);
                ////显示销售称重新增页面
                //splitRequisAdd.Show();
            }












            ///////////基础信息
            if (c == 112)
            {
                //企业列表
                BusinesWinFormShow businesWinFormShow = new BusinesWinFormShow();
                //隐藏窗体边框
                businesWinFormShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                businesWinFormShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(businesWinFormShow);
                //显示企业列表页面
                businesWinFormShow.Show();
            }
            if (c == 122)
            {
                //部门列表
                ShowDepartmentData showDepartmentData = new ShowDepartmentData();
                //隐藏窗体边框
                showDepartmentData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                showDepartmentData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(showDepartmentData);
                //显示部门列表页面
                showDepartmentData.Show();
            }
            if (c == 132)
            {
                //客户列表
                ClientserShow clientserShow = new ClientserShow();
                //隐藏窗体边框
                clientserShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                clientserShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(clientserShow);
                //显示部客户列表页面
                clientserShow.Show();
            }
            ///////////活畜管理
            if (c == 212)
            {
                //进场登记列表
                CheckInShowHtml checkInShowHtml = new CheckInShowHtml();
                //隐藏窗体边框
                checkInShowHtml.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                checkInShowHtml.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(checkInShowHtml);
                //显示进场登记列表页面
                checkInShowHtml.Show();
            }
            if (c == 221)
            {
                //进场检疫新增
                AddCOAData addCOAData = new AddCOAData();
                //隐藏窗体边框
                addCOAData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                addCOAData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(addCOAData);
                //显示进场检疫新增页面
                addCOAData.Show();
            }
            if (c == 232)
            {
                //活畜称重显示
                LiveAnimalsShowHtml liveAnimalsShowHtml = new LiveAnimalsShowHtml();
                //隐藏窗体边框
                liveAnimalsShowHtml.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                liveAnimalsShowHtml.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(liveAnimalsShowHtml);
                //显示活畜称重显示页面
                liveAnimalsShowHtml.Show();
            }
            if (c == 242)
            {
                //待宰圈管理显示
                SlaughtrerdShow slaughtrerdShow = new SlaughtrerdShow();
                //隐藏窗体边框
                slaughtrerdShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                slaughtrerdShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(slaughtrerdShow);
                //显示待宰圈管理显示页面
                slaughtrerdShow.Show();
            }
            ///////////基础设置
            if (c == 312)
            {
                //磅秤设置显示
                ScaleData scaleData = new ScaleData();
                //隐藏窗体边框
                scaleData.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                scaleData.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(scaleData);
                //显示磅秤设置显示页面
                scaleData.Show();
            }
            if (c == 332)
            {
                //扣减项显示
                DeductionWinFormShwo deductionWinFormShwo = new DeductionWinFormShwo();
                //隐藏窗体边框
                deductionWinFormShwo.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                deductionWinFormShwo.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(deductionWinFormShwo);
                //显示扣减项显示页面
                deductionWinFormShwo.Show();
            }
            if (c == 342)
            {
                //待宰圈设置显示
                WaitingWinFormShow waitingWinFormShow = new WaitingWinFormShow();
                //隐藏窗体边框
                waitingWinFormShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                waitingWinFormShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(waitingWinFormShow);
                //显示待宰圈设置显示页面
                waitingWinFormShow.Show();
            }
            //代号管理新增
            if (c == 353)
            {
                //代号管理新增
                AddUPCData AddUPCData_ = new AddUPCData();
                //隐藏窗体边框
                AddUPCData_.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                AddUPCData_.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(AddUPCData_);
                //代号管理新增页面
                AddUPCData_.Show();
            }
            //代号管理列表
            if (c == 354)
            {
                //代号管理列表
                ShowUPCData AddUPCData_ = new ShowUPCData();
                //隐藏窗体边框
                AddUPCData_.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                AddUPCData_.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(AddUPCData_);
                //代号管理列表页面
                AddUPCData_.Show();
            }
            //磅秤类型显示
            if (c == 352)
            {
                //磅秤类型显示
                ScaleTypetesShow scaleTypetesShow = new ScaleTypetesShow();
                //隐藏窗体边框
                scaleTypetesShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                scaleTypetesShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(scaleTypetesShow);
                //显示磅秤类型显示页面
                scaleTypetesShow.Show();
            }
            //日志管理
            if (c == 355)
            {
                //日志管理
                LogData_ scaleTypetesShow = new LogData_();
                //隐藏窗体边框
                scaleTypetesShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                scaleTypetesShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(scaleTypetesShow);
                //显示磅秤类型显示页面
                scaleTypetesShow.Show();
            }
            ///////////批宰管理
            if (c == 412)
            {
                //批宰计划显示
                SlaughterWinFormShow slaughterWinFormShow = new SlaughterWinFormShow();
                //隐藏窗体边框
                slaughterWinFormShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                slaughterWinFormShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(slaughterWinFormShow);
                //显示批宰计划显示页面
                slaughterWinFormShow.Show();
            }
            if (c == 422)
            {
                //白条显示
                PigWeighTime pigWeighTime = new PigWeighTime();
                //隐藏窗体边框
                pigWeighTime.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                pigWeighTime.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(pigWeighTime);
                //显示白条显示页面
                pigWeighTime.Show();
            }
            if (c == 432)
            {
                //副产显示
                WeighingSheetWinForm weighingSheetWinForm = new WeighingSheetWinForm();
                //隐藏窗体边框
                weighingSheetWinForm.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                weighingSheetWinForm.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(weighingSheetWinForm);
                //显示副产显示页面
                weighingSheetWinForm.Show();
            }
            if (c == 442)
            {
                //皮重设置显示
                TareShow tareShow = new TareShow();
                //隐藏窗体边框
                tareShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                tareShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(tareShow);
                //显示皮重设置显示页面
                tareShow.Show();
            }
            if (c == 452)
            {
                //皮重设置显示
                SplitRequisShow splitRequisShow = new SplitRequisShow();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示皮重设置显示页面
                splitRequisShow.Show();
            }
            ///////////称重
            if (c == 512)
            {
                //膘油称重显示
                OilyfatShow splitRequisShow = new OilyfatShow();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示膘油称重显示页面
                splitRequisShow.Show();
            }
            if (c == 522)
            {
                //生产划膘显示
                ScratchesShow splitRequisShow = new ScratchesShow();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示生产划膘显示页面
                splitRequisShow.Show();
            }
            //分割入库称重
            if (c == 531)
            {
                //分割入库称重显示
                SegmentationTime splitRequisShow = new SegmentationTime();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示分割入库称重显示页面
                splitRequisShow.Show();
            }
            if (c == 542)
            {
                //销售称重显示
                SaleShow splitRequisShow = new SaleShow();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示销售称重显示页面
                splitRequisShow.Show();
            }

            if (c == 660)
            {
                //销售明报表
                SaleDisliteShow splitRequisShow = new SaleDisliteShow();
                //隐藏窗体边框
                splitRequisShow.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                splitRequisShow.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(splitRequisShow);
                //显示销售称重显示页面
                splitRequisShow.Show();
            }

            //分割明细表
            if (c == 610)
            {
                //分割明细表
                SegmentationStatement segmentationStatement = new SegmentationStatement();
                //隐藏窗体边框
                segmentationStatement.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                segmentationStatement.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(segmentationStatement);
                //显示副产显示页面
                segmentationStatement.Show();
            }
            //分割汇总表
            if (c == 620)
            {
                //副产显示
                SegmentationStatement2 segmentationStatement = new SegmentationStatement2();
                //隐藏窗体边框
                segmentationStatement.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                segmentationStatement.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(segmentationStatement);
                //显示副产显示页面
                segmentationStatement.Show();
            }
            //报表
            //进场登记明细
            if (c == 630)
            {
                //副产显示
                CheckDeail checkDeail = new CheckDeail();
                //隐藏窗体边框
                checkDeail.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                checkDeail.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(checkDeail);
                //显示副产显示页面
                checkDeail.Show();
            }
            //白条称重明细
            if (c == 640)
            {
                //副产显示
                WhiteporkReports whiteporkReports = new WhiteporkReports();
                //隐藏窗体边框
                whiteporkReports.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                whiteporkReports.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(whiteporkReports);
                //显示副产显示页面
                whiteporkReports.Show();
            }
            //白条称重汇总
            if (c == 650)
            {
                //副产显示
                WhiteporkCollect whiteporkCollect = new WhiteporkCollect();
                //隐藏窗体边框
                whiteporkCollect.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                whiteporkCollect.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(whiteporkCollect);
                //显示副产显示页面
                whiteporkCollect.Show();
            }

            //销售汇总
            if (c == 670)
            {
                //销售汇总
                SalesSummarys segmentationStatement = new SalesSummarys();
                //隐藏窗体边框
                segmentationStatement.FormBorderStyle = FormBorderStyle.None;
                //知识子非顶级窗体
                segmentationStatement.TopLevel = false;
                //将子窗体载入panel
                this.panel1.Controls.Add(segmentationStatement);
                //显示副产显示页面
                segmentationStatement.Show();
            }

        }

        private void uiButton1_Click(object sender, EventArgs e)
        {
            if (uiButton1.Text == "退出登录")
            {
                UsersLogin.UsersId = 0;
                UsersLogin.UsersName = "";
                UsersLogin.RolesName = "";
                Login login = new Login();
                this.Hide();
                login.Show();
            }
            else
            {
                Login login = new Login();
                this.Hide();
                login.Show();
            }
        }
    }
}
